/*
 * EOColumnAssociationAdditions.m
 *
 * You may freely copy, distribute, and reuse the code in this example.
 * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
 * fitness for any particular use.
 *
 * Written by Kenny Leung, NeXT Technical Support
 *
 */

#import "EOColumnAssociationAdditions.h"
#import "ObjectAdditions.h"

@implementation EOColumnAssociation(NXFormatterValidation)

- (BOOL)formatterWillChangeValueFor:rowIdentifier :columnIdentifier sender:sender
{
    if ( [[controller delegate] respondsToSelector:@selector(controller:associationDidBeginEditing:)] )
        [[controller delegate] controller:controller associationDidBeginEditing:self];

    return YES;
}

- (BOOL)formatterWillChangeValueFor:identifier at:(unsigned int)position sender:sender
{
    if ( [[controller delegate] respondsToSelector:@selector(controller:associationDidBeginEditing:)] )
        [[controller delegate] controller:controller associationDidBeginEditing:self];

    return YES;
}

@end
